#include "ScnsVl53l0x.c.h"

#if defined(SCNS_VL53L0X_ENABLE)&&SCNS_VL53L0X_ENABLE==1

#include "ScnsIic.h"
#include "ScnsMenu.h"
const ScnsBspVl53l0xConfig scnsBspVl53l0xConfig[SCNS_VL53L0X_MAX]={
    {.device=0X12,.a=2.913e+05f,.b=316.0f,.c=161.5f,.d=100.0f,},
};

ScnsStatus scnsBspVl53l0xInit(ScnsVl53l0xEnum vl5N)
{
    
    return SCNS_STATUS_OK;
}

ScnsStatus scnsBspVl53l0xPostInit(ScnsVl53l0xEnum vl5N)
{
    scnsMenuSetPage(1,"Vl53l0x",NULL);
    scnsMenuAddConstStruct(1,scnsVl53l0xResult[vl5N],millimeters,,SCNS_TYPE_UINT16);
    return SCNS_STATUS_OK;
}

void scnsBspVl53l0xResultUpdate(ScnsVl53l0xEnum vl5N)
{

}

ScnsStatus scnsBspVl53l0xWrite(ScnsVl53l0xEnum vl5N,uint8 device,const uint8*addr,uint8 addrLen,const uint8*data,uint8 dataLen)
{
    return scnsIicWriteTick(SCNS_IIC_SCL_B7_SDA_B6,device,addr,addrLen,data,dataLen,4);
}

ScnsStatus scnsBspVl53l0xRead(ScnsVl53l0xEnum vl5N,uint8 device,const uint8*addr,uint8 addrLen,uint8*data,uint8 dataLen)
{
    return scnsIicReadTick(SCNS_IIC_SCL_B7_SDA_B6,device,addr,addrLen,data,dataLen,4);
}

#endif
